]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Use constraint to resize screenShieldGroup
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 30 Jun 2022 13:29:55 +0000 (15:29 +0200)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Sat, 2 Jul 2022 22:18:19 +0000 (22:18 +0000)
We want the actor to always fill the entire uiGroup. It seems
better and simpler to express that with a contraint than resizing
it explicitly on every monitor change.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2351>

js/ui/layout.js

index fe91ff186c962eb41dc97e6d3fa0b0a781212d88..0292dd002554032ad8aef8acc72eb8296dcaf1e5 100644 (file)
@@ -241,6 +241,10 @@ var LayoutManager = GObject.registerClass({
             visible: false,
             clip_to_allocation: true,
             layout_manager: new Clutter.BinLayout(),
+            constraints: new Clutter.BindConstraint({
+                source: this.uiGroup,
+                coordinate: Clutter.BindCoordinate.ALL,
+            }),
         });
         this.addChrome(this.screenShieldGroup);
 
@@ -521,9 +525,6 @@ var LayoutManager = GObject.registerClass({
     }
 
     _updateBoxes() {
-        this.screenShieldGroup.set_position(0, 0);
-        this.screenShieldGroup.set_size(global.screen_width, global.screen_height);
-
         if (!this.primaryMonitor)
             return;